package com.audaque.encoding.mapper;

import com.audaque.encoding.entity.CallbackDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 文件赋码后的回调表 Mapper 接口
 * </p>
 *
 * @author mayong
 * @since 2024-04-03
 */
public interface CallbackMapper extends BaseMapper<CallbackDO> {

    @Update("UPDATE t_source_config_new \n" +
            "SET remark = #{errMsg} \n" +
            "WHERE\n" +
            "\tid = ( SELECT r.table_config_id FROM t_request_new r WHERE r.req_file_id = #{srcFileId} )")
    void updateStatus(@Param("srcFileId") String srcFileId, @Param("errMsg") String errMsg);
}
